package com.weixx.swagger.controller;

import com.weixx.swagger.pojo.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;



//Operation接口
@Api(value = "接口api注解测试",tags = "是的")
@RestController
public class HelloController {
    @ApiOperation("hello控制类")
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String hello(){
        return "hello";
    }
    //只要我们的返回值中，存在实体类，他就会被扫描道swagger中
    @RequestMapping(value = "/user",method = RequestMethod.GET)
    public User user(){
        return new User();
    }

}
